<?php

class Default_Form_Login extends Zend_Form
{

    public function init()
    {
        $username = new Zend_Form_Element_Text('username');
        $username->setRequired(true)
                 ->addFilters(array(
                         'StringTrim',
                         'StripTags'
                 ))
                 ->addValidator('EmailAddress', TRUE)
                 ->setLabel('Email:')
                 ->addErrorMessage('Nhập Email')
                 ->removeDecorator("HtmlTag");
        
        $password = new Zend_Form_Element_Password('password');
        $password->setRequired(true)
                 ->setLabel('Mật khẩu')
                 ->addErrorMessage('Nhập mật khẩu')
                 ->removeDecorator("HtmlTag");
        
        $remember = new Zend_Form_Element_Checkbox('remember');
        $remember->removeDecorator("HtmlTag")
                 ->removeDecorator("Label");
        
        $login = new Zend_Form_Element_Submit('submitlogin');
        $login->setLabel('Đăng nhập')
                ->removeDecorator("DtDdWrapper");
        
        $this->addElements(array($username, $password, $remember, $login));
    }


}

